<style>
</style>
<template>
    <span>
        <Drawer title="学员测评" :closable="false" placement="right" v-model="staffDrawer" width="50%">
            <Row style="padding-top: 5px">
                <Table :loading="loading" border :columns="userColumns" :data="userData" ref="userTable"></Table>
            </Row>
        </Drawer>
    </span>
</template>
<script>
    import {staffScore} from "@/api/bus";

    export default {
        name: "studentScore",
        props: {
        },
        data() {
            return {
                staffDrawer: false,
                modalTitle: '学员测评',
                loading: true,
                userId: "",
                permData: [],
                userColumns: [
                    {
                        type: "index",
                        width: 60,
                        align: "center"
                    },
                    {
                        title: "测评项目",
                        key: "examTypeName"
                    },
                    {
                        title: "测评得分",
                        key: "abilityScore",
                        sortable: true
                    },
                    {
                        title: "测评分段",
                        key: "duanName"
                    },
                    {
                        title: "hr测评得分",
                        key: "hrScore",
                        sortable: true
                    }
                ],
                userData: [],
                totalUser: 0
            }
        },
        methods: {
            //加载数据
            showDrawer(params){
                this.staffDrawer = true;
                if (params.id) {
                    this.userId = params.id;
                    this.getData();
                }
            },
            getData() {
                this.loading = true;
                staffScore(this.userId).then(res => {
                    this.loading = false;
                    if (res.status === true) {
                        this.userData = res.data.rows;
                    }
                });
            },
        },
        mounted() {

        }
    }
</script>